<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/styles/travelnotedetail.css" rel="stylesheet" type="text/css">
    <link href="/js/plugins/datepicker/datepicker.css" rel="stylesheet">
    <link href="/styles/wendaDetail.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/system/emoji.js"></script>
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/system/common.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script type="text/javascript" src="/js/system/travelnotedetail.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery-cookie-v1.4.1/jquery.cookie.js"></script>
    <style>
        .vc_articleT img {
            width: 100%;
        }
    </style>

    <script>
        //将 (中文)   格式数据替换成标签图片:
        function emoji(str) {
            //表情图片资源, 从马蜂窝扣出来的, 可以百度:
            //1:HttpURLConnection 使用  jdk自带的 代码中如何发起http请求
            //2:HttpClient  第三方http请求发送的框架
            //3:webmagic  专门用于爬虫框架
            //现金付款
            //匹配中文
            var reg = /\([\u4e00-\u9fa5A-Za-z]*\)/g;
            var matchArr = str.match(reg);
            if (!matchArr) {
                return str;
            }
            for (var i = 0; i < matchArr.length; i++) {
                str = str.replace(matchArr[i], '<img src="' + EMOJI_MAP[matchArr[i]] + '"style="width: width:28px;"/>')
            }
            return str;
        }

        $(function () {
            var index = 0;
            //回复
            $("#_j_reply_list").on("click", ".replyBtn", function () {
                var touser = $(this).data("touser");
                var toid = $(this).data("toid");
                $("#commentContent").focus();
                $("#commentContent").attr("placeholder", "回复：" + touser);

                $("#commentType").val(1);
                $("#refCommentId").val(toid);
            })

            //发表回复
            $(".commentBtn").click(function () {
                if (!$("#commentContent").val()) {
                    popup("评论不能为空");
                    return;
                }
                $.get('/checkLogin', function (data) {
                    if (!data.success) {
                        popup("请先登录");
                        return;
                    }
                    $("#commentForm").ajaxSubmit(function (data) {
                        $("#commentContent").val("");
                        $("#commentContent").attr("placeholder", "");
                        $("#_j_reply_list").append(data);
                    })
                });

            });

            //替换表情
            var ps = $("._j_reply_content");
            for (var i = 0; i < ps.length; i++) {
                $(ps[i]).html(emoji($(ps[i]).html() + ""));
            }

            $("._j_support_btn").addClass("btn-answer");
            var token = $.cookie('token');
            if (token) {
                var questionId = $('._j_support_btn').data("id");

                //检查分享状态  favor
                $.get("/ask/checkFocusnumState", {questionId: questionId}, function (data) {
                    if (data) {//已经收藏
                        $("._j_support_btn").removeClass("btn-answer");
                    } else {//没有收藏
                        $("._j_support_btn").addClass("btn-answer");
                    }
                })

            }


            //关注
            $(".focusnum_num").click(function () {
                var questionId = $(this).data("id");
                $.get("/ask/focusnum", {questionId: questionId}, function (data) {
                    if (data.success) {
                        $("._j_same_num").html(data.data.focusnum);
                        $("._j_support_btn").removeClass("btn-answer");
                        popup("关注成功");
                    } else {
                        if (data.code == 102) {
                            $("._j_support_btn").addClass("btn-answer");
                            popup(data.msg);
                        } else {
                            $("._j_support_btn").addClass("btn-answer");
                            $("._j_same_num").html(data.data.focusnum);
                            popup("已取消关注");
                        }
                    }
                });
            })

            //评论
            $("._j_goto_comment").click(function () {
                $("#commentContent").focus();
            })

        })

    </script>
</head>

<body style="position: relative;">
<div class="topBar">
    <div class="topBarC">
        <div class="logo"><a title="马蜂窝自由行" href="javascript:;">马蜂窝自由行</a></div>
        <div class="t_nav">
            <ul id="pnl_nav" data-cs-t="headnav_wo">
                <li data-cs-p="index">
                    <strong class="t"><a href="/">首页</a></strong>
                </li>
                <li data-cs-t="wenda" data-cs-p="wenda">
                    <strong class="t"><a data-cs-p="from_wo_nav" href="/ask/wenda">问答</a></strong>
                </li>
                <li data-cs-t="things" data-cs-p="things">
                    <strong class="t"><a data-cs-p="from_wo_nav" href="/itemshop/list">积分商城</a></strong>
                </li>
                <li data-cs-p="together">
                    <strong class="t"><a href="javascript:;">结伴</a></strong>
                </li>
                <li data-cs-p="group">
                    <strong class="t"><a href="javascript:;">小组</a></strong>
                </li>
                <li data-cs-p="mall">
                    <strong class="t"><a href="javascript:;">蜂首俱乐部</a></strong>
                </li>
                <li class="drop" data-cs-p="other">
                    <strong class="t"><a href="javascript:;">更多<b></b></a></strong>
                </li>
            </ul>
        </div>
        <div class="t_search">
            <form method="GET" action="/search/s.php" name="search">
                <input type="text" class="key" value="" name="q" id="word">
                <input type="submit" value="" class="btn">
            </form>
        </div>

        <#if userInfo??>
            <div class="login_info">
                <div class="head_user">
                    <a href="/mine/home">
                        <img src="${(userInfo.headImgUrl)!'/images/default.jpg'}"/>
                        <i class="icon_caret_down"></i>
                    </a>
                </div>
                <div class="header_msg">
                    消息<i class="icon_caret_down"></i>
                </div>
                <div class="header_daka">
                    <a href="javascript:;">打卡</a>
                </div>
            </div>
        <#else>
            <div class="login-out">
                <a class="weibo-login" href="#" title="微博登录" rel="nofollow"></a>
                <a class="qq-login" href="#" title="QQ登录" rel="nofollow"></a>
                <a class="weixin-login" href="#" title="微信登录" rel="nofollow"></a>
                <a id="_j_showlogin" title="登录骡窝窝" href="/login.html" rel="nofollow">登录</a>
                <span class="split">|</span>
                <a href="/regist.html" title="注册帐号" rel="nofollow">注册</a>
            </div>
        </#if>

    </div>
</div>
<div class="wrapper">
    <div class="detail-wrap clearfix">
        <div class="col-main">
            <div class="q-detail">
                <div class="q-content">
                    <div class="q-title">
                        <a href="/wenda/area-10065.html" target="_blank"
                           class="location"><i></i>${(question.dest.name)!}</a>
                        <h1>
                            <a href="/wenda/detail-18458675.html">${(question.title)!}</a>
                        </h1>
                    </div>
                    <div class="q-desc vc_article vc_articleT">
                        ${(question.content.content)!}
                        <div class="q-info1 clearfix">
                            <div class="q-tags fl">
                                <#list  question.tagsList! as t>
                                    <a class="a-tag" href="/wenda/area-10065.html" target="_blank">${(t.name!)}</a>
                                </#list>

                            </div>
                            <div class="pub-bar fr">

                                <a class="name" href="/wenda/u/43303516/answer.html"
                                   target="_blank"> ${(question.author.nickname)!}</a>
                                <span class="time"><span>${(question.createTime)?string("yyyy-MM-dd HH:mm:ss")}</span></span>
                            </div>
                        </div>
                    </div>
                    <div class="q-operate clearfix">
                        <div class="fl">
                            <!-- 问题分享 -->
                            <div class="q-share cate-share">
                                <a class="_js_showShare"><i class="q-share-icon"></i>分享</a>
                                <div class="share-pop _j_share_pop hide clearfix" data-title="为什么说在北京通勤等于取经？上下班到底有多苦？"
                                     data-qid="18458675">
                                    <a title="分享到新浪微博" class="sina _j_do_share" data-site="wb"></a>
                                    <a title="分享到QQ空间" class="zone _j_do_share" data-site="qz"></a>
                                    <a title="分享到微信" class="weixin _j_do_share_wx" data-site="wx"></a>
                                </div>
                            </div>
                            <!-- 邀请回答 -->
                            <div class="seek-help _j_tip_box">
                                <a class="_j_seek_help_new">邀请蜂蜂回答</a>
                            </div>
                            <!-- 举报 -->
                            <div class="admin_hide tip-off">
                                <a data-japp="report" data-refer="http://www.mafengwo.cn/wenda/detail-18458675.html"
                                   data-refer-uid="43303516" data-app="qa.question" data-busi-id="qid:18458675">举报</a>
                            </div>
                        </div>
                        <div class="fr">
                            <span class="atten-num">${questionVo.viewnum!0}浏览</span>
                            <span class="atten-num"><span class="_j_same_num">${questionVo.focusnum!0}</span>人关注</span>

                            <a class="btn-atten focusnum_num  _j_support_btn"  rel="nofollow" data-id="${question.id!}"><span>关注</span></a>

                            <a class="btn-answer _j_btn_goanswer  _j_goto_comment" rel="nofollow">回答</a>
                        </div>
                    </div>
                </div>
                <div class="answer-wrap">
                    <div class="hd">
                        <#--<a href="javascript:;" class="view_all">查看全部12个回答</a>-->
                        <div style="display:none;"><span id="_j_anum">12</span>个回答</div>
                    </div>
                    <div>
                        <div class="mfw-cmt-wrap" id="_j_reply_list">
                            <#if list ??>
                                <!--评论-->
                                <#list list as c>
                                    <div class="mfw-cmt _j_reply_item">
                                        <div class="mcmt-info">
                                            <div class="mcmt-photo">
                                                <a href="javascript:;" target="_blank">
                                                    <img src="${c.headUrl!}"
                                                         width="48" height="48" alt="${c.username!}">
                                                </a>
                                            </div>
                                            <div class="mcmt-user">
                                                <a href="javascript:;" target="_blank" class="name">${c.username!}
                                                    (${c.city!})</a>
                                                <a href="javascript:;" class="level">LV.${c.level!}</a>
                                                <a href="javascript:;" class="identity identity-guide"
                                                   target="_blank"></a>
                                                <a href="javascript:void(0);" class="per_attention"
                                                   data-japp="following"
                                                   data-uid="76382990" data-follow_class="hide">
                                                    <img src="http://images.mafengwo.net/images/home/tweet/btn_sfollow.gif"
                                                         width="38" height="13" border="0" title="关注TA">
                                                </a>
                                            </div>
                                            <ul class="answer-medal fr">
                                                <#--<li class="gold">
                                                    <div class="btn"><i></i><a href="javascript:;"
                                                                               target="_blank" &lt;#&ndash;style='${c.godlist?seq_contains((userInfo.id)!)?string("display:none", "")}'&ndash;&gt;>金牌回答</a>
                                                    </div>
                                                </li>-->
                                            </ul>
                                            <div class="mcmt-other">
                                                <span class="floor">${c_index +1}F</span>
                                            </div>
                                        </div>
                                        <div class="mcmt-con-wrap clearfix">
                                            <div class="mcmt-con">

                                                <#if c.type == 1>
                                                    <div class="mcmt-quote">
                                                        <p>引用 ${(c.refComment.username)!}
                                                            发表于 ${(c.refComment.createTime?string('yyyy-MM-dd HH:ss'))!}
                                                            的回复：</p>
                                                        <p class="_j_reply_content">${(c.refComment.content)!}</p>
                                                    </div>
                                                    <div class="mcmt-word">
                                                        <p class="_j_reply_content">回复${(c.refComment.username)!}
                                                            ：${(c.content)!}</p>
                                                    </div>
                                                <#else>
                                                    <div class="mcmt-quote">
                                                    </div>
                                                    <div class="mcmt-word">
                                                        <p class="_j_reply_content">${(c.content)!}</p>
                                                    </div>
                                                </#if>
                                            </div>
                                            <div class="mcmt-tag">
                                            </div>
                                        </div>
                                        <div class="mcmt-bot">
                                            <div class="time">${(c.createTime?string('yyyy-MM-dd HH:ss'))!}</div>
                                            <div class="option">
                                                <a role="button" class="reply-report">举报</a>
                                                <a role="button" class="_j_reply replyBtn" data-touser="${c.username!}"
                                                   data-toid="${c.id!}">回复</a>
                                            </div>
                                        </div>
                                    </div>
                                </#list>
                            </#if>
                        </div>

                        <!--发表回复-->
                        <div class="mcmt-reply-wrap _j_replywrap ">
                            <div class="mcmt-tab">
                                <ul class="_j_replytab">
                                    <li class="_j_publish_tab on" data-mode="article">问答回复<i></i></li>
                                </ul>
                            </div>
                            <div class="mcmt-tab-con">
                                <div class="photo-con">
                                    <a href="/u/53383161.html" target="_blank" title="蚂蜂测试窝用户"><img
                                                src="http://n1-q.mafengwo.net/s12/M00/35/98/wKgED1uqIreAU9QZAAAXHQMBZ74008.png?imageMogr2%2Fthumbnail%2F%2148x48r%2Fgravity%2FCenter%2Fcrop%2F%2148x48%2Fquality%2F90"
                                                alt="骡窝窝测试用户"></a>
                                </div>
                                <div class="reply-con clearfix _j_article_mode _j_editor" id="_j_editor"
                                     style="display: block;">
                                    <dl>
                                        <dt>
                                            <!-- 各种选项-->
                                            <div class="reply-choice">
                                                <a role="button" class="expression" id="_j_replyfacetrigger"
                                                   title="选择表情"></a>
                                                <div class="clear"></div>
                                                <!--表情-->
                                                <#include "../common/emotion.ftl">
                                            </div>
                                        </dt>
                                        <dd>
                                            <div class="reply-text">

                                                <form action="/ask/commentAdd" method="post" id="commentForm">
                                                    <input type="hidden" name="questionId" value="${question.id!}">
                                                    <input type="hidden" name="questionTitle"
                                                           value="${question.title!}">
                                                    <input type="hidden" name="type" value="0" id="commentType">
                                                    <input type="hidden" name="refComment.id" id="refCommentId">
                                                    <#--<input type="hidden" name="floor" value="${(list?size)!0}">-->
                                                    <textarea class="_j_replyarea" name="content" cols="30" rows="10"
                                                              id="commentContent" placeholder=""></textarea>
                                                </form>
                                            </div>
                                        </dd>
                                    </dl>
                                    <div class="reply-submit">
                                        <!-- 有loading状态 -->
                                        <a role="button" class="_j_publish_reply commentBtn" title="发表回复">发表回复</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="col-side"></div>
        </div>
    </div>
</body>

</html>